From 236118bf89484ed0d34b73dc3b5d4ea66d8da634 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 21 Jan 2002 18:44:20 +0000 Subject: [PATCH] Document allowed values for ifactory. * gtk/gtkitemfactory.c (gtk_item_factory_popup, gtk_item_factory_popup_with_data): Document allowed values for ifactory. * gtk/gtkitemfactory.c (gtk_item_factory_delete_entry): Make it work for paths with underline accelerators. --- ChangeLog | 9 +++++++++ ChangeLog.pre-2-0 | 9 +++++++++ ChangeLog.pre-2-10 | 9 +++++++++ ChangeLog.pre-2-2 | 9 +++++++++ ChangeLog.pre-2-4 | 9 +++++++++ ChangeLog.pre-2-6 | 9 +++++++++ ChangeLog.pre-2-8 | 9 +++++++++ gtk/gtkitemfactory.c | 20 +++++++++++++++++--- 8 files changed, 80 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 164a6f104c..73cc454787 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2002-01-21 Matthias Clasen + + * gtk/gtkitemfactory.c (gtk_item_factory_popup, + gtk_item_factory_popup_with_data): Document allowed values + for ifactory. + + * gtk/gtkitemfactory.c (gtk_item_factory_delete_entry): Make + it work for paths with underline accelerators. + Fri Jan 18 16:31:21 2002 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_size_allocate): only resize the diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 164a6f104c..73cc454787 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,12 @@ +2002-01-21 Matthias Clasen + + * gtk/gtkitemfactory.c (gtk_item_factory_popup, + gtk_item_factory_popup_with_data): Document allowed values + for ifactory. + + * gtk/gtkitemfactory.c (gtk_item_factory_delete_entry): Make + it work for paths with underline accelerators. + Fri Jan 18 16:31:21 2002 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_size_allocate): only resize the diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 164a6f104c..73cc454787 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,12 @@ +2002-01-21 Matthias Clasen + + * gtk/gtkitemfactory.c (gtk_item_factory_popup, + gtk_item_factory_popup_with_data): Document allowed values + for ifactory. + + * gtk/gtkitemfactory.c (gtk_item_factory_delete_entry): Make + it work for paths with underline accelerators. + Fri Jan 18 16:31:21 2002 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_size_allocate): only resize the diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 164a6f104c..73cc454787 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,12 @@ +2002-01-21 Matthias Clasen + + * gtk/gtkitemfactory.c (gtk_item_factory_popup, + gtk_item_factory_popup_with_data): Document allowed values + for ifactory. + + * gtk/gtkitemfactory.c (gtk_item_factory_delete_entry): Make + it work for paths with underline accelerators. + Fri Jan 18 16:31:21 2002 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_size_allocate): only resize the diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 164a6f104c..73cc454787 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,12 @@ +2002-01-21 Matthias Clasen + + * gtk/gtkitemfactory.c (gtk_item_factory_popup, + gtk_item_factory_popup_with_data): Document allowed values + for ifactory. + + * gtk/gtkitemfactory.c (gtk_item_factory_delete_entry): Make + it work for paths with underline accelerators. + Fri Jan 18 16:31:21 2002 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_size_allocate): only resize the diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 164a6f104c..73cc454787 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,12 @@ +2002-01-21 Matthias Clasen + + * gtk/gtkitemfactory.c (gtk_item_factory_popup, + gtk_item_factory_popup_with_data): Document allowed values + for ifactory. + + * gtk/gtkitemfactory.c (gtk_item_factory_delete_entry): Make + it work for paths with underline accelerators. + Fri Jan 18 16:31:21 2002 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_size_allocate): only resize the diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 164a6f104c..73cc454787 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,12 @@ +2002-01-21 Matthias Clasen + + * gtk/gtkitemfactory.c (gtk_item_factory_popup, + gtk_item_factory_popup_with_data): Document allowed values + for ifactory. + + * gtk/gtkitemfactory.c (gtk_item_factory_delete_entry): Make + it work for paths with underline accelerators. + Fri Jan 18 16:31:21 2002 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_size_allocate): only resize the diff --git a/gtk/gtkitemfactory.c b/gtk/gtkitemfactory.c index 780d2d7b1c..af4299761f 100644 --- a/gtk/gtkitemfactory.c +++ b/gtk/gtkitemfactory.c @@ -1326,10 +1326,24 @@ void gtk_item_factory_delete_entry (GtkItemFactory *ifactory, GtkItemFactoryEntry *entry) { + gchar *path; + gchar *parent_path; + gchar *name; + g_return_if_fail (GTK_IS_ITEM_FACTORY (ifactory)); g_return_if_fail (entry != NULL); + g_return_if_fail (entry->path != NULL); + g_return_if_fail (entry->path[0] == '/'); + + if (!gtk_item_factory_parse_path (ifactory, entry->path, + &path, &parent_path, &name)) + return; + + gtk_item_factory_delete_item (ifactory, path); - gtk_item_factory_delete_item (ifactory, entry->path); + g_free (path); + g_free (parent_path); + g_free (name); } /** @@ -1429,7 +1443,7 @@ ifactory_delete_popup_data (GtkObject *object, /** * gtk_item_factory_popup: - * @ifactory: a #GtkItemFactory + * @ifactory: a #GtkItemFactory of type #GTK_TYPE_MENU (see gtk_item_factory_new()) * @x: the x position * @y: the y position * @mouse_button: the mouse button which was pressed to initiate this action @@ -1449,7 +1463,7 @@ gtk_item_factory_popup (GtkItemFactory *ifactory, /** * gtk_item_factory_popup_with_data: - * @ifactory: a #GtkItemFactory + * @ifactory: a #GtkItemFactory of type #GTK_TYPE_MENU (see gtk_item_factory_new()) * @popup_data: data available for callbacks while the menu is posted * @destroy: a #GtkDestroyNotify function to be called on @popup_data when * the menu is unposted -- 2.30.2